#pragma once

#define MYSWITCHDLGXMLNAME _T("switch_dlg.xml")
class BaseDialog;
class CSwitchDlg : public CWindowWnd, public INotifyUI
{
public:
	CSwitchDlg(BaseDialog *pDlg);
	virtual ~CSwitchDlg();
protected:
	virtual LPCTSTR GetWindowClassName() const { return _T("mogu Switch Dialog"); }
	
	virtual void Notify(TNotifyUI& msg);
	virtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);

	// custom message map
	typedef HRESULT(CSwitchDlg::*CustomMsgHandler)(WPARAM, LPARAM, BOOL&);
	typedef std::map<UINT, CustomMsgHandler> MessageMap;
	virtual MessageMap* InitMessageMap();

	// custom message handler
	HRESULT OnCreate(WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	HRESULT OnNcHitTest(WPARAM wParam, LPARAM lParam, BOOL& bHandled);
private:
	CPaintManagerUI m_pm;

private:
	
public:
	
	void SwitchOnAll();
	void SwitchOffAll();

public:
	BOOL m_bAll_switch;
	BOOL m_bNet_switch;
	BOOL m_bProc_switch;
	BOOL m_bFile_switch;
	BOOL m_bReg_switch;
	BOOL m_bDrv_switch;

	CButtonUI *m_pBtn_btn_net_switch;
	CButtonUI *m_pBtn_btn_proc_switch;
	CButtonUI *m_pBtn_btn_file_switch;
	CButtonUI *m_pBtn_btn_reg_switch;
	CButtonUI *m_pBtn_btn_drv_switch;
	CButtonUI *m_pBtn_btn_all_switch;
	BaseDialog *m_pMainDlg;
};

